<template>
  <div>
      <h1>testDefineComponent......</h1>
      <p>传值（必传）：{{userName}}</p>
  </div>
</template>

<script>
/* ==========defineComponent============= */
import {defineComponent} from 'vue'

const testDefineComponent =  defineComponent({
    props: {
        userName: {
            required: true,
            type: String
        }
    },
    setup(props,context) {
        console.log('props-userName:',props.userName)
        console.log('context:',context)
    }
    })

export default testDefineComponent
</script>

<style>

</style>